<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>ng-true-value ng-false-value 改变默认值</title>
    <script src="../angular.js"></script>
</head>
<body>
    <div ng-app="gg" ng-controller="ctrl">
        游戏：<input type="checkbox" ng-model="data.game" ng-true-value="1" ng-false-value="0">
        电影：<input type="checkbox" ng-model="data.video" ng-true-value="1" ng-false-value="0">
        {{data}}
        <div ng-show="data.game == 1">
            <h1>游戏</h1>
            <textarea name="" id="" cols="30" rows="10"></textarea>
        </div>
        <div ng-show="data.video == 1">
            <h1>电影</h1>
            <textarea name="" id="" cols="30" rows="10"></textarea>
        </div>
    </div>

    <script>
        var mod = angular.module('gg', []);
        mod.controller('ctrl', ['$scope', function ($scope) {
            $scope.data = {game : 0, video :　0}
        }]);
    </script>
</body>
</html>